﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ZhCun.Framework.Common.Models
{
    public class DbPagingModel
    {
        int onePageCount = 20;
        /// <summary>
        /// 每页大小,如不赋值取默认值 20
        /// </summary>
        public int OnePageCount
        {
            get { return onePageCount; }
            set { onePageCount = value; }
        }
        int pageNo = 1;
        /// <summary>
        /// 当前页,默认为1;
        /// </summary>
        public int PageNo
        {
            get { return pageNo; }
            set { pageNo = value; }
        }
        bool isDesc = false;
        /// <summary>
        /// 是否降序,默认false
        /// </summary>
        public bool IsDesc
        {
            get { return isDesc; }
            set { isDesc = value; }
        }
        string[] orderField;
        /// <summary>
        /// 排序字段,默认为主键
        /// </summary>
        public string[] OrderField
        {
            get { return orderField; }
            set { orderField = value; }
        }
        int pageCount;
        /// <summary>
        /// 用来输出总页数.
        /// </summary>
        public int PageCount
        {
            get { return pageCount; }
            set { pageCount = value; }
        }
        int recordCount;
        /// <summary>
        /// 用来输出当前查询条件的记录总数
        /// </summary>
        public int RecordCount
        {
            get { return recordCount; }
            set { recordCount = value; }
        }
    }
}
